package com.ranjiaqi.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @ClassName TestDateFormat1
 * @Description TODO
 * @Author hp
 * @Date 2021/6/21 21:13
 * @Version 1.0
 **/
public class TestDateFormat1 {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
        String str = "2019:06:05 18:20:32";
        Date date = simpleDateFormat.parse(str);
        System.out.println(date);

    }

}
